package gui;

import java.io.*;
import java.util.*;
/**
 *
 * @author 小智
 */
public class Play {
    private String name;
    private int number;
    private String assess;
    public Play(){
        
    }
    public Play(String name,int number,String assess){
        this.name=name;
        this.number=number;
        this.assess=assess;
    }
        
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getNumber() {
		return number;
	}
	public void setNumber(int number) {
		this.number = number;
	}
	public String getAssess() {
		return assess;
	}
	public void setAssess(String assess) {
		this.assess = assess;
	}
        public String toString() {
		return "Play [name=" + name + ", number=" + number + ", assess=" + assess + "]";
	}
        public void writeData(PrintWriter out)
        {
            out.println(name + "|" + number + "|" + assess+ "|");
            
        }
        public void readData(Scanner in)
        {
           String line = in.nextLine();
           String[] tokens = line.split("\\|");
           name = tokens[0];
           number = Integer.parseInt(tokens[1]);
           assess= tokens[2];
           
        }  
}

